{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2012 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!--hung.nguyentuan 16/4/2013 change price immediately -->
<script>
    $(document).ready(function() {
        var curPrice = [];
        for(var i = 1; i <= totalProduct; i++)
        {
            curPrice[i] = $("#product"+i).text();
        }
        $("#sub").click(function() {
            var width = $("#ins_width").val(); 
            var drop = $("#ins_drop").val(); 
            $("#ins_width").val("Width:");
            $("#ins_drop").val("Drop:");
            var price = 0.0;
            if($.isNumeric(width) && $.isNumeric(drop))
            {
                if(width == 1 && drop == 1)
                {
                    for(var i = 1; i <= totalProduct; i++)
                    {
                        $("#product"+i).text(""+curPrice[i]);
                    }    
                }else{
                    for(var i = 1; i <= totalProduct; i++)
                    {
                        price = parseFloat($("#product"+i).text().split(' ')[1]);
                        price = price * width * drop;
                        $("#product"+i).text($("#product"+i).text().split(' ')[0] + " " + price.toFixed(2));
                    }
                }            
            }
        });
        $("#ins_width").blur(function(){
            if($("#ins_width").val == 'Width:' && $("#ins_drop").val() == 'Drop:' )
            {
                for(var i = 1; i <= totalProduct; i++)
                {
                    $("#product"+i).text(""+curPrice[i]);
                }  
            }
        });
        $("#ins_drop").blur(function(){
            if($("#ins_width").val() == 'Width:' && $("#ins_drop").val() == 'Drop:' )
            {
                for(var i = 1; i <= totalProduct; i++)
                {
                    $("#product"+i).text(""+curPrice[i]);
                }  
            }
        });
    });

</script>
<div id="Content_bot">
    <div id="Step">
        <div class="Step_item">
            <img src="{$img_dir}gs.png">
            <h2>Get Start</h2>
            <p>Easy to follow tips and advice for first time visitors</p>
            <a href="#">Read on</a>
        </div><!--End .Step_item-->

        <div class="Step_item">
            <img src="{$img_dir}thuoc.png">
            <h2>How to Measure</h2>
            <p>A guide on measuring for different bling types</p>
            <a href="#">Read on</a>
        </div><!--End .Step_item-->

        <div class="Step_item">
            <img src="{$img_dir}kg.png">
            <h2>Frieght &amp; Delivery</h2>
            <p>Information and estimates on delivery times</p>
            <a href="#">Read on</a>
        </div><!--End .Step_item-->


        <form action="#" method="get">
            <h2>Quick Quote</h2>
            <p>Enter your window size in milimetres</p>
            <input class="qq_text" id="ins_width" type="text" value="Width:" onClick="if(this.value=='Width:')this.value=''" onblur="if(this.value=='') this.value='Width:'" >
            <input class="qq_text" id="ins_drop" type="text" value="Drop:" onClick="if(this.value=='Drop:')this.value=''" onblur="if(this.value=='') this.value='Drop:'">
            <input id="sub" type="button" value="Check" >
        </form>
        <div class="clear"></div>

    </div>

    <!--<div id="pr">
        <img src="{$img_dir}Shop_onl.png">
        <h3>Shopping Online with Cheapa-Blings</h3>
        <p>tWe endeavour to sell the cheapest blings on the internet.
            Our Blings are shipped Autralia wide using the most reputable 
            courier company’s. We endeavour to sell the cheapest blings 
            on the internet. Our Blings are shipped Autralia wide using the 
            most reputable courier company’s. 
        </p>
    </div>-->
</div>

